<form class="tableform" method="post" action="index.php?app=b2c&ctl=admin_member&act=sms_queue" id='messenger-sms-form' >
<{if $noMobile}>
<div class='division'>
	<div class='error'>
		<h4 style="border:none">以下<{$noMobile|@count}>位会员由于没有填写手机短信联系方式，将无法收到信息。</h4>
		<div>
			<{foreach from=$noMobile item=item name=nm}>
				<{$item.login_account}>，
			<{/foreach}>
		</div>
	</div>
</div>
<{/if}>

<h4><{t}>允许回复<{/t}></h4>
<div class='division'>
	<{input type="bool" name="use_reply" value='false' style="margin:10px;"}>
	<span class='notice-inline'>会员可回复此短信；查看回复，请登录短信平台。</span>
</div>


<h4><{t}>信息内容<{/t}></h4>( 不能含有成对的【】)
    <div class="division messager-main">
      <input type="hidden" id="setSmsSignLen" value="<{$setSmsSignLen}>" />
 <{input type="textarea" style=" width:91%;" rows="10" name="content" vtype="required" onkeyup="javascript:this.getNext('.notice-word').getElement('span').set('html',this.value.length+parseInt($('setSmsSignLen').getValue()));"}>
 <div class='notice-word' style=" width:91%;">已输入<span><{$setSmsSignLen}></span>个字符<label class="red">(包括短信签名内容)</label>
	<span style='float:right;'>67字/条;如超过，将累计条数</span>
 </div>
 </div>

<div class="table-action">
	<{button label=$___b2c="发送"|t:'b2c' type="submit" id="sms-form-submit"}>
</div>
<input type="hidden" name="mobile_number" value=<{$mobile_number}> />
</form>
<script>
   (function(){
	if(Browser.ie6)$E('#messenger-sms-form input[name=title]').focus();

    var _form = $('messenger-sms-form');
    var btn =$('sms-form-submit');
    //var finder = finderGroup['<{$env.get.finder_id}>'];

    _form.store('target',{
    	onRequest:function() {
    		//btn.set('disabled', true);
    	},
        onComplete:function(){

        },
        onSuccess:function(response){
            var hash_res_obj = JSON.decode(response);
            if (hash_res_obj.success != undefined && hash_res_obj.success != "")
            {
                try{
                    var _dialogIns = btn.getParent('.dialog').retrieve('instance');
                }catch(e){}

                if(_dialogIns)
                {
                    _dialogIns.close();
                  //  finder.refresh.delay(400,finder);
                }
            }
            else
            {
                //alert(hash_res_obj.error);
            }
        }
    });
/*
        btn.addEvent('click',function(){

            _form.fireEvent('submit',{stop:$empty});



        });
  */
})();

</script>
